package cn.lijiajia3515.cairo.auth.modules.department;


import cn.lijiajia3515.cairo.core.extension.Extension;

import java.io.Serializable;
import java.util.Arrays;
import java.util.Set;
import java.util.stream.Collectors;


public enum DepartmentExtension implements Extension<DepartmentField>, Serializable {
	BASIC(DepartmentField.NAME, DepartmentField.REMARK),
	INFO(DepartmentField.NAME, DepartmentField.REMARK, DepartmentField.PARENT, DepartmentField.SORT),
	ALL(DepartmentField.values());
	private final Set<DepartmentField> fields;

	DepartmentExtension(DepartmentField... fields) {
		this.fields = Arrays.stream(fields).collect(Collectors.toSet());
	}

	@Override
	public Set<DepartmentField> fields() {
		return fields;
	}
}
